﻿/*
* @autor: hectorea
* @date: 12/07/2012
* @programming interview 10
*/

using System;
using System.Text;

namespace ConcatenateTwoNumbers
{
    /// <summary>
    /// Programming Interview10: Write a method that concatenate two integer values.
    /// </summary>
    class Program
    {
        static void Main(string[] args)
        {
            do
            {
                Console.Clear();

                StringBuilder sb1 = new StringBuilder();
                sb1.Append("Please type an integer number: ");

                Console.Write(sb1.ToString());

                int number1 = int.Parse(Console.ReadLine());


                StringBuilder sb2 = new StringBuilder();
                sb2.Append("Please type an integer number: ");

                Console.Write(sb2.ToString());

                int number2 = int.Parse(Console.ReadLine());

                Console.Write("The concatenated number of {0} and {1} is {2}", number1, number2, number1.Concatenate(number2));

                Console.WriteLine();
                Console.WriteLine("Please type any key to continue testing or [X] to exit");

            } while (!Console.ReadLine().ToUpper().Equals("X"));
        }
    }
}
